.root {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--vd-spacing-sm) 0;
}

$item-radius: 10px;

.item {
  display: flex;
  width: 100%;
  padding: 0 var(--vd-spacing-base) 24px;
  position: relative;
  align-items: flex-end;

  .content {
    position: relative;
    max-width: 85%;
    padding: var(--vd-spacing-xs) var(--vd-spacing-sm);
    border-radius: $item-radius;
  }

  .prevContent {
    white-space: pre-wrap;
  }

  &:global(.request) {
    justify-content: flex-end;

    .content {
      background-color: var(--vd-color-secondary-800);
    }
  }

  &:global(.response) {
    justify-content: flex-start;
    .content {
      background-color: var(--vd-color-gray-800);
    }
  }

  &:global(.loading) {
    opacity: 0.94;
  }

  // .extension {
  //   color: var(--vd-color-link);
  //   margin-right: 0.5em;
  // }

  .loading {
    width: 1em;
    height: 1em;
    vertical-align: middle;
  }

  .pending {
    margin-right: 4px;
  }

  .actions {
    position: absolute;
    left: 0;
    bottom: -23px;
    // transform: translateY(-50%);
    display: none;
    gap: 3px;
    color: var(--vd-color-gray-600);

    & > * {
      opacity: 0.7;
      cursor: pointer;
      background-color: var(--vd-color-gray-300);
      border-radius: 4px;
      padding: 2px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      font-size: 14px;
    }

    & > *:hover {
      opacity: 1;
    }

    .remove {
      // color: var(--vd-color-danger-200);
    }

    .copy {
    }
  }

  &:hover .actions,
  &:global(.loading) .actions {
    display: flex;
  }

  .stop {
    cursor: pointer;
    color: var(--vd-color-gray-700);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--vd-color-gray-50);

    .stopIcon {
      color: var(--vd-color-danger-200);
    }
  }
}

.intro {
  background-color: white;
  margin: 1em;
  border: 1px solid var(--vd-color-gray-300);
  border-radius: 5px;
  padding: var(--vd-spacing-xs) var(--vd-spacing-base);
  line-height: 1.6;

  img {
    max-width: 60px;
  }

  code {
    background-color: rgba(#616161, 0.1);
    border-radius: 0.25em;
    box-decoration-break: clone;
    color: #616161;
    font-size: 0.9rem;
    padding: 0.25em;
  }
}

.extensionActions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding-top: var(--vd-spacing-xs);
}

.alert {
  background-color: var(--vd-color-danger-200);
  margin-left: -16px;
  margin-right: -16px;
  margin-bottom: -8px;
  margin-top: 16px;
  padding: var(--vd-spacing-xs);
  border-bottom-left-radius: $item-radius;
  border-bottom-right-radius: $item-radius;
}
